package com.example.barcodeapp.persenter.own;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.ui.own.bean.KeChengBean;
import com.example.barcodeapp.ui.wode.bean.DingDanBean;
import com.example.barcodeapp.utils.RxUtils;

public class DingDanPresenter extends BasePersenter<IOwn.DingDanView> implements IOwn.DingDanPresenter {

    @Override
    public void getDingDan(String page, String uid, String state, String type) {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getDingDan(page, uid, state, type)
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<DingDanBean>(mView) {
                    @Override
                    public void onNext(DingDanBean dingDanBean) {
                        mView.getDingDanBean(dingDanBean);
                    }
                }));
    }
}
